package com.njmaomao.gj.pyot.common.bean.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(value = "微信响应参数")
public class WechatResponse {

    @ApiModelProperty(notes = "微信返回的业务结果 必填[是] SUCCESS/FAIL")
    private String resultCode;

    @ApiModelProperty(notes = "微信返回的错误代码 必填[否] 详细参见下文错误列表")
    private String errCode;

    @ApiModelProperty(notes = "微信返回的错误代码描述 必填[否] 错误信息描述")
    private String errCodeDes;

    protected WechatResponse(String resultCode, String errCode, String errCodeDes) {
        this.resultCode = resultCode;
        this.errCode = errCode;
        this.errCodeDes = errCodeDes;
    }

    protected WechatResponse() {
        this.resultCode = "SUCCESS";
    }

    public boolean isResultSuccess() {
        return "SUCCESS".equalsIgnoreCase(getResultCode());
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public String getErrCodeDes() {
        return errCodeDes;
    }

    public void setErrCodeDes(String errCodeDes) {
        this.errCodeDes = errCodeDes;
    }
}
